package api

import (
	"log"
	"time"

	"github.com/gin-gonic/gin"
)

type MiddleWareAPI struct {
}

func (api *MiddleWareAPI) TestMiddleWare(ctx *gin.Context) {
	operator := ctx.MustGet("operator")
	log.Printf("在 handler 中获取操作人：%v \n", operator)

	time.Sleep(time.Second * 2)
}

func (api *MiddleWareAPI) BusinessHandle(ctx *gin.Context) {
	log.Println("处理业务逻辑")
}
